#pragma once

#include<stdio.h>

#define SIZE 1024

#define NON_BUFFER  1
#define LINE_BUFFER 2
#define FULL_BUFFER 4

#define MODE 0666

typedef struct _myFILE
{
  int fd;
  int flags;
  int flush_mode;
  char buffer[SIZE];
  int pos;
  int cap;
}myFILE;


myFILE* myfopen(const char* pathname,const char* mode);//r,w,a,r+,w+...

int myfputs(const char* str,myFILE* fp);

void myfflush(myFILE* fp);

void myfclose(myFILE* fp);

